import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';

@Component({
  selector: 'button-self',
  templateUrl: 'buttonself.html'
})
export class ButtonSelf {
  tabBarElement: any;
  constructor(public navCtrl: NavController) {
    if (document.querySelector('.tabbar')) {
      this.tabBarElement = document.querySelector('.tabbar.show-tabbar');
    }

  }

  ionViewWillEnter() {
    if (this.tabBarElement) {
      this.tabBarElement.style.display = 'none';
    }
  }

  ionViewWillLeave() {
    if (this.tabBarElement) {
      this.tabBarElement.style.display = 'flex';
    }
  }

}
